<?php
namespace MkGc\Controller;

use Think\Controller;

class IndexController extends Controller
{
    public function index()
    {
        //读取公告信息
        $notice_info = "";
        $filename    = "./news.txt";
        if (file_exists($filename))
        {
            $fp          = fopen($filename, "r");
            $notice_info = fread($fp, filesize($filename));
            fclose($fp);
        }
        for ($i = 0; $i < 260 - mb_strlen($notice_info); $i++)
            $notice_info = $notice_info . "　";

        $this->assign("title_befor", "工程管理");
        $this->assign("login_flag", getLoginFlag());
        $this->assign("notice_info", $notice_info);
        $this->assign("dis_name", session("user.dis_name"));
        //授权字段信息
        foreach (M("User")->getDbFields() as $k => $v)
            $this->assign($v, session("user." . $v));
        //$this->assign("gc_manage_auth", session("user.gc_manage_auth"));
        //$this->assign("gc_manage_auth", "1");

        $this->display();
    }
}